/*
 * @Author: caijw 
 * @Date: 2018-11-11 12:02:22 
 * @Last Modified by: caijw
 * @Last Modified time: 2019-01-04 22:42:35
 * 
 * 公用头部
 */

import React, { Component } from 'react';
import './header.less';
import backSrc from '../../static/images/back.png';

import {withRouter} from 'react-router-dom';

class Header extends Component {
    //返回上一级
    back = () =>{
        this.props.history.go(-1);
    }
    //挂载前
    componentWillMount(){
        console.log(this.props);
    }
    //渲染
    render() {
        return (
            <header className="header">
                {/* <div className="back" onClick={this.back}>
                    <img src={backSrc} alt=""></img>
                </div> */}
                <div>{this.props.title}</div>
            </header>
        )
    }
}
export default withRouter(Header);